package com.study.concurrent.singleton;
/**
 * Description:
 * User: 27010
 * DateTime: 2018/6/21 0:17
 */
//[Java枚举实现单例模式 \- 作业部落 Cmd Markdown 编辑阅读器](https://www.zybuluo.com/natsumi/note/692892)
//[java \- Singleton using enum \- Code Review Stack Exchange](https://codereview.stackexchange.com/questions/27296/singleton-using-enum)
//如何正确实现?
public enum Singleton5 {
    INSTANCE;
    private Instance instance;
    Singleton5(){
        this.instance = new Instance();
    }
    public Instance getInstance(){
        return instance;
    }
}

